package com.example.springcloudalibaba.controller;

import com.example.springcloudalibaba.dao.TestDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jie
 * @date 2021/4/6 -13:40
 */
@RestController
public class TestController {

    @Autowired
    private TestDao testDao;

    @GetMapping("/user/{name}")
    public String getUserName(@PathVariable String name) {
        return "my name is " + name;
    }

    @GetMapping("/user/update")
    public void orderUpdate() {
        testDao.updateOrder();
    }
}
